package com.cxhc.app.api;

import com.cxhc.common.core.controller.BaseController;
import com.cxhc.common.utils.StringUtils;
import com.cxhc.system.service.app.ICmRedoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * 房间信息Controller
 * 
 * @author Dhq
 * @date 2024-11-14
 */
@RestController
@RequestMapping("/api/redo")
public class CmRedoController extends BaseController
{
    @Autowired
    private ICmRedoService cmRedoService;

    /**
     * 查询房间信息列表
     */
    @GetMapping("/list")
    @ResponseBody
    public List<Map<String,String>> list(String userId)
    {
        if (StringUtils.isEmpty(userId)){
            throw new RuntimeException("用户id不可为空");
        }
        return  cmRedoService.selectRedooList(userId);
    }


}
